package com.my.testerbaoshenprovider.demo;

import com.alibaba.fastjson.JSON;
import com.lingtianyu.erbaoshen.test.demo.DemoService2;
import com.lingtianyu.erbaoshen.test.demo.model.TestReq;
import com.lingtianyu.erbaoshen.test.demo.model.TestResp;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Service
public class DemoServiceImpl2 implements DemoService2 {
    @Override
    public List<TestResp> test(TestReq req) {
        System.out.println("-------------test service2-----------" + JSON.toJSONString(req));
        TestResp testResp = new TestResp();
        testResp.setL(1l);
        testResp.setI(12);
        testResp.setS("aaa");
        testResp.setDate(new Date());
        testResp.setF(1f);
        testResp.setD(1.1);
        testResp.setBigDecimal(new BigDecimal("1.8"));
        testResp.setResp2(new TestResp.Resp2());
        List<TestResp> list = new ArrayList<>();
        list.add(testResp);
        return list;
    }
}
